/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.femass.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


@Embeddable
public class AvaliacaoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "Revisor_cod")
    private int revisorcod;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Artigo_cod")
    private int artigocod;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "nota_c1")
    private String notaC1;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "nota_c2")
    private String notaC2;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "nota_c3")
    private String notaC3;

    public AvaliacaoPK() {
    }

    public AvaliacaoPK(int revisorcod, int artigocod, String notaC1, String notaC2, String notaC3) {
        this.revisorcod = revisorcod;
        this.artigocod = artigocod;
        this.notaC1 = notaC1;
        this.notaC2 = notaC2;
        this.notaC3 = notaC3;
    }

    public int getRevisorcod() {
        return revisorcod;
    }

    public void setRevisorcod(int revisorcod) {
        this.revisorcod = revisorcod;
    }

    public int getArtigocod() {
        return artigocod;
    }

    public void setArtigocod(int artigocod) {
        this.artigocod = artigocod;
    }

    public String getNotaC1() {
        return notaC1;
    }

    public void setNotaC1(String notaC1) {
        this.notaC1 = notaC1;
    }

    public String getNotaC2() {
        return notaC2;
    }

    public void setNotaC2(String notaC2) {
        this.notaC2 = notaC2;
    }

    public String getNotaC3() {
        return notaC3;
    }

    public void setNotaC3(String notaC3) {
        this.notaC3 = notaC3;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) revisorcod;
        hash += (int) artigocod;
        hash += (notaC1 != null ? notaC1.hashCode() : 0);
        hash += (notaC2 != null ? notaC2.hashCode() : 0);
        hash += (notaC3 != null ? notaC3.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AvaliacaoPK)) {
            return false;
        }
        AvaliacaoPK other = (AvaliacaoPK) object;
        if (this.revisorcod != other.revisorcod) {
            return false;
        }
        if (this.artigocod != other.artigocod) {
            return false;
        }
        if ((this.notaC1 == null && other.notaC1 != null) || (this.notaC1 != null && !this.notaC1.equals(other.notaC1))) {
            return false;
        }
        if ((this.notaC2 == null && other.notaC2 != null) || (this.notaC2 != null && !this.notaC2.equals(other.notaC2))) {
            return false;
        }
        if ((this.notaC3 == null && other.notaC3 != null) || (this.notaC3 != null && !this.notaC3.equals(other.notaC3))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.femass.model.AvalicacaoPK[ revisorcod=" + revisorcod + ", artigocod=" + artigocod + ", notaC1=" + notaC1 + ", notaC2=" + notaC2 + ", notaC3=" + notaC3 + " ]";
    }

}
